<?php 
require_once("include/conn.php");
require_once("include/config.php");
require_once("include/page.php");
if (isset($_GET['nname'])) {
	$nname=intval($_GET['nname']);
}else {
	back("参数错误");
}
$table=$tb_dz;
$sql_lanmu="select id,buname from $tb_bm where id='".$nname."'";
$lanmu_conn=mysql_query($sql_lanmu);
if($lanmu_row=mysql_fetch_array($lanmu_conn)){ 
	$title=$lanmu_row['buname'];
	$url="&nname=".$nname ;
}

$page=$_GET['page'];
$perpage=20;
$sql_all="select count(*) from   $table  WHERE  buid = '".$nname."' AND isdel = '0'";
$con   =   mysql_db_query($db_name,$sql_all);   
$num   =   mysql_result($con,0);   //   统计当前总的记录数   
$list=new page($num,$page,$perpage);  
$strartrow=$list->getStartRow();
$sql   =   "select   *   from    $table  WHERE  buid = '".$nname."' AND isdel = '0'  order  by   id   DESC   limit $strartrow,$perpage";   //从上面的起点开始查询出20条数据   
$cn_ma   =   mysql_db_query($db_name,$sql); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title ?></title>
</head>
<STYLE type=text/css>BODY {
	FONT-SIZE: 9pt
}
TABLE {
	FONT-SIZE: 9pt
}
</STYLE>
<body>
 <?php include("include/top.php"); ?>
<TABLE width=779 border=0 align="center" cellPadding=0 
cellSpacing=0 borderColor=#111111 id=AutoNumber1 style="BORDER-COLLAPSE: collapse">
  <TBODY>
  <TR>
    <TD>      
      <P align=center><FONT color=#000000><B 
      style="FONT-SIZE: 16pt"><?php echo $title ?></B></FONT></P>
      <DIV align=center>
      <CENTER>
      <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#336699 height=25 
      cellSpacing=0 cellPadding=2 width=100% border=1>
        <TBODY>
        <TR bgColor=#cccccc>
          <TD width=43 bgColor=#e8e8e8 height=25>序号</TD>
          <TD width=455 bgColor=#e8e8e8 height=12>标题</TD>
          <TD width=131 bgColor=#e8e8e8 height=12>修改日期</TD>
		 	 <?php 
			 $i=1;
		 while($row = mysql_fetch_array($cn_ma)){
		 	?>  
		  </TR>
        <TR>
          <TD height=25><?php echo $i; ?></TD>
          <TD height=16 align="left">
		  <?php echo "<a href=";		 
			  echo "'detailshow.php?id=$row[id]' target='_blank' title='标题：".$row[title]." &#13;&#10;发布单位：".$row[author]." 
			  &#13;&#10;发布日期：".$row[tdate]."'>".substr_cut($row[title],60);
		  echo "</a>";?>		  </TD>
          <TD height=1><?php echo $row[tdate]; ?></TD></TR>
		  <?php 
		   $i++;
		  }?>
		  </TBODY></TABLE></CENTER></DIV>
      <DIV align=center style="line-height:22px;font-size:20px;">
	  <?php echo $list->showPageList()?>
	</DIV>
</TD></TR></TBODY></TABLE>
<?php include("include/bot.php"); ?>
</body>
</html>
